package org.example.springaop.controller;


import lombok.extern.slf4j.Slf4j;
import org.example.springaop.aspect.TimeRecord;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/test")
public class TestController {
    @RequestMapping("/t1")
    public int t1(){
      log.info("t1方法执行...");
        return 1 ;
    }
    @RequestMapping("/t2")
    public String t2(){
        log.info("有异常的t2方法执行...");
        int a = 1/0 ;
        return "t2" ;
    }
    @RequestMapping("/t3")
    public void t3(){
        log.info("无返回结果的t3方法执行...");
    }
}
